package com.zz.info.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import com.zz.info.domain.Info;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface InfoDao {
	
	Info get(Long cid);
	
	List<Info> list(Map<String,Object> map);
	
	List<Info> listDisp(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(Info content);
	
	int update(Info content);
	
	int remove(Long cid);
	
	int batchRemove(Long[] cids);

	@Update("update info_content  set hits=IFNULL(hits,0)+1  where cid=#{cid}")
	int updateRead(Long cid);
}
